{"ast":null,"code":"import * as React from 'react';\nimport canUseDom from '../Dom/canUseDom';\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React.useLayoutEffect : React.useEffect;\nexport default useLayoutEffect;\nexport var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n  var firstMountRef = React.useRef(true);\n  useLayoutEffect(function () {\n    if (!firstMountRef.current) {\n      return callback();\n    }\n  }, deps);\n  // We tell react that first mount has passed\n  useLayoutEffect(function () {\n    firstMountRef.current = false;\n    return function () {\n      firstMountRef.current = true;\n    };\n  }, []);\n};","map":{"version":3,"names":["React","canUseDom","useLayoutEffect","process","env","NODE_ENV","useEffect","useLayoutUpdateEffect","callback","deps","firstMountRef","useRef","current"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-util/es/hooks/useLayoutEffect.js"],"sourcesContent":["import * as React from 'react';\nimport canUseDom from '../Dom/canUseDom';\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React.useLayoutEffect : React.useEffect;\nexport default useLayoutEffect;\nexport var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n  var firstMountRef = React.useRef(true);\n  useLayoutEffect(function () {\n    if (!firstMountRef.current) {\n      return callback();\n    }\n  }, deps);\n  // We tell react that first mount has passed\n  useLayoutEffect(function () {\n    firstMountRef.current = false;\n    return function () {\n      firstMountRef.current = true;\n    };\n  }, []);\n};"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,SAAS,MAAM,kBAAkB;AACxC;AACA;AACA;AACA,IAAIC,eAAe,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,IAAIJ,SAAS,EAAE,GAAGD,KAAK,CAACE,eAAe,GAAGF,KAAK,CAACM,SAAS;AAC9G,eAAeJ,eAAe;AAC9B,OAAO,IAAIK,qBAAqB,GAAG,SAASA,qBAAqB,CAACC,QAAQ,EAAEC,IAAI,EAAE;EAChF,IAAIC,aAAa,GAAGV,KAAK,CAACW,MAAM,CAAC,IAAI,CAAC;EACtCT,eAAe,CAAC,YAAY;IAC1B,IAAI,CAACQ,aAAa,CAACE,OAAO,EAAE;MAC1B,OAAOJ,QAAQ,EAAE;IACnB;EACF,CAAC,EAAEC,IAAI,CAAC;EACR;EACAP,eAAe,CAAC,YAAY;IAC1BQ,aAAa,CAACE,OAAO,GAAG,KAAK;IAC7B,OAAO,YAAY;MACjBF,aAAa,CAACE,OAAO,GAAG,IAAI;IAC9B,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AACR,CAAC"},"metadata":{},"sourceType":"module"}